<LayoutTableSmall>
    <!-- 顶部 -->
    <template slot="top">cvaga</template>
    <!-- 其他 -->
    <template slot="other"></template>
    <!-- 搜索 -->
    <template slot="search">
        
        <el-form :inline="true" label-position="left" label-width="80px" :model="mixinTable_tableSearchData"
            @submit.native.prevent class="demo-form-inline">

            <el-form-item>
                <el-select v-model="mixinTable_tableSearchSenior.category_id.value"  @change="mixinTable_searchData" placeholder="门店分类" style="width: 100px" clearable>
                    <el-option v-for="item in category" :key="item.id" :value="item.id" :label="item.name"></el-option>
                </el-select>
            </el-form-item>

            <!-- <el-form-item>
                <el-select v-model="mixinTable_tableSearchSenior.status.value"  @change="mixinTable_searchData" placeholder="门店状态" style="width: 100px" clearable>
                    <el-option label="正常" value="1"></el-option>
                    <el-option label="审核中" value="0"></el-option>
                    <el-option label="已拒绝" value="-1"></el-option>
                    <el-option label="已到期" value="-2"></el-option>
                </el-select>
            </el-form-item> -->

            <el-form-item>
                <el-input clearable v-model="mixinTable_tableSearchData.name" placeholder="请输入门店名称"
                    @change="mixinTable_searchData" style="width:200px">
                    <el-button slot="append" icon="el-icon-search" @click="mixinTable_searchData"></el-button>
                </el-input>
            </el-form-item>

        </el-form>
        
    </template>
    <!-- 功能 -->
    <template slot="function">
        <el-button type="primary" @click="editBoxOpen({type:'add'})">新增门店</el-button>
    </template>
    <!-- 表格 -->
    <template slot="table">
        <el-table v-loading="mixinTable_loading" :data="mixinTable_tableData" border style="width: 100%;" :ref="mixinPage_vueName+'TableSmall'" height="100%"
            @selection-change="mixinTable_handleSelectionChangeTableSmall">
            <el-table-column type="selection" width="50" align="center"></el-table-column>
            <el-table-column type="index" width="65" index="mixinTable_indexMethod" align="center" label="门店ID">
            </el-table-column>
            <el-table-column prop="name" label="门店名称">
            </el-table-column>
            <el-table-column prop="category.name" label="门店分类">
            </el-table-column>
            <el-table-column label="门店地址" prop="address">
            </el-table-column>
            <el-table-column prop="manage" label="店长姓名">
            </el-table-column>
            <el-table-column prop="mobile" label="联系电话">
            </el-table-column>
            <el-table-column prop="status" label="门店状态">
                <template slot-scope="scope">
                    <div v-if="scope.row.status == 1">正常</div>
                    <div v-if="scope.row.status == 0">审核中</div>
                    <div v-if="scope.row.status == -1">已拒绝</div>
                    <div v-if="scope.row.status == -2">已到期</div>
                </template>
            </el-table-column>
            <el-table-column prop="created_at" label="创建时间">
                <template slot-scope="scope">
                    {{ $vFN.Utils.timestampToDate("yyyy-MM-dd HH:mm:ss", scope.row.created_at) }}
                </template>
            </el-table-column>
            <el-table-column label="操作" align="center" width="220">
                <template slot-scope="scope">
                    <el-button @click="editBoxOpen({type:'update',id:scope.row.id})">修改</el-button> 
                    <el-popover placement="bottom-end" title="" trigger="click"
                        @show="showCode(scope.row.id)">
                        <ShareQrcodeBox 
                                        :ref="'shareQrcodeBox'+scope.row.id" 
                                        :appWindow="appWindow"></ShareQrcodeBox>
                        <el-button slot="reference" style="margin:0px 10px;">推广</el-button>
                    </el-popover>
                    <el-button type="danger" plain @click="mixinTable_selectTableDeleteData([scope.row])">删除</el-button>
                </template>
            </el-table-column>

        </el-table>

    </template>
    <!-- 表格选项 -->
    <template slot="options">
        <el-button :disabled="mixinTable_selectTableData.length<=0" @click="mixinTable_selectTableDeleteData()">
            停用已选</el-button>
        <el-button :disabled="mixinTable_selectTableData.length<=0"
            @click="mixinTable_clearSelectionChangeTableSmall()">取消选择
        </el-button>
    </template>
    <!-- 分页 -->
    <template slot="page">
        <el-pagination class="paginationStyle" v-if="mixinTable_pageData.total>0" background
            @current-change="mixinTable_pagingData($event)" :current-page="mixinTable_pageData.pageNum"
            :page-size.sync="$vFN.Constants.pageSize" layout="total, prev, pager, next,jumper"
            :total.sync="mixinTable_pageData.total">
        </el-pagination>
    </template>
</LayoutTableSmall>